class PersonalFilesModel {
  int? errcode;
  String? errmsg;
  Data? data;
  String? message;

  PersonalFilesModel({this.errcode, this.errmsg, this.data, this.message});

  PersonalFilesModel.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    data = json['data'] != null ? new Data.fromJson(json['data']) : null;
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['message'] = this.message;
    return data;
  }
}

class Data {
  BaseInfo? baseInfo;
  EducationInfo? educationInfo;
  FamilyInfo? familyInfo;

  Data({this.baseInfo, this.educationInfo, this.familyInfo});

  Data.fromJson(Map<String, dynamic> json) {
    baseInfo = json['base_info'] != null
        ? new BaseInfo.fromJson(json['base_info'])
        : null;
    educationInfo = json['education_info'] != null
        ? new EducationInfo.fromJson(json['education_info'])
        : null;
    familyInfo = json['family_info'] != null
        ? new FamilyInfo.fromJson(json['family_info'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.baseInfo != null) {
      data['base_info'] = this.baseInfo!.toJson();
    }
    if (this.educationInfo != null) {
      data['education_info'] = this.educationInfo!.toJson();
    }
    if (this.familyInfo != null) {
      data['family_info'] = this.familyInfo!.toJson();
    }
    return data;
  }
}

class BaseInfo {
  String? name;
  String? gender;
  String? birthday;
  String? placeOfBirth;
  String? phone;
  String? identificationId;
  String? email;
  String? address;
  String? bankAccountName;
  String? bankAccountNo;
  int? departmentId;
  String? departmentName;
  String? country;
  String? jobName;

  BaseInfo(
      {this.name,
        this.gender,
        this.birthday,
        this.placeOfBirth,
        this.phone,
        this.identificationId,
        this.email,
        this.address,
        this.bankAccountName,
        this.bankAccountNo,
        this.departmentId,
        this.departmentName,
        this.country,
        this.jobName});

  BaseInfo.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    gender = json['gender'];
    birthday = json['birthday'];
    placeOfBirth = json['place_of_birth'];
    phone = json['phone'];
    identificationId = json['identification_id'];
    email = json['email'];
    address = json['address'];
    bankAccountName = json['bank_account_name'];
    bankAccountNo = json['bank_account_no'];
    departmentId = json['department_id'];
    departmentName = json['department_name'];
    country = json['country'];
    jobName = json['job_name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['gender'] = this.gender;
    data['birthday'] = this.birthday;
    data['place_of_birth'] = this.placeOfBirth;
    data['phone'] = this.phone;
    data['identification_id'] = this.identificationId;
    data['email'] = this.email;
    data['address'] = this.address;
    data['bank_account_name'] = this.bankAccountName;
    data['bank_account_no'] = this.bankAccountNo;
    data['department_id'] = this.departmentId;
    data['department_name'] = this.departmentName;
    data['country'] = this.country;
    data['job_name'] = this.jobName;
    return data;
  }
}

class EducationInfo {
  String? certificate;
  String? studyField;
  String? studySchool;

  EducationInfo({this.certificate, this.studyField, this.studySchool});

  EducationInfo.fromJson(Map<String, dynamic> json) {
    certificate = json['certificate'];
    studyField = json['study_field'];
    studySchool = json['study_school'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['certificate'] = this.certificate;
    data['study_field'] = this.studyField;
    data['study_school'] = this.studySchool;
    return data;
  }
}

class FamilyInfo {
  String? marital;
  String? spouseCompleteName;
  String? spouseBirthdate;
  int? children;
  String? emergencyContact;
  String? emergencyPhone;

  FamilyInfo(
      {this.marital,
        this.spouseCompleteName,
        this.spouseBirthdate,
        this.children,
        this.emergencyContact,
        this.emergencyPhone});

  FamilyInfo.fromJson(Map<String, dynamic> json) {
    marital = json['marital'];
    spouseCompleteName = json['spouse_complete_name'];
    spouseBirthdate = json['spouse_birthdate'];
    children = json['children'];
    emergencyContact = json['emergency_contact'];
    emergencyPhone = json['emergency_phone'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['marital'] = this.marital;
    data['spouse_complete_name'] = this.spouseCompleteName;
    data['spouse_birthdate'] = this.spouseBirthdate;
    data['children'] = this.children;
    data['emergency_contact'] = this.emergencyContact;
    data['emergency_phone'] = this.emergencyPhone;
    return data;
  }
}
